]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
authPrompt: Remove colons from questions
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 10 Feb 2020 18:15:16 +0000 (15:15 -0300)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 12 Feb 2020 19:29:48 +0000 (19:29 +0000)
Unfortunately, the question that is displayed comes directly
from PAM. It usually is just "Password:", which comes from
pam-unix, but other questions can be set, usually with the
colons, since they are crafted with a CLI workflow in mind.

Manually drop the colons from questions asked by PAM. This
is also done by the PolKit agent, which shows how the stack
is fragile, but it's what we have for now.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922

js/gdm/authPrompt.js

index 974f5177837712a663506cb5cef80a71c135c97f..13c7025c3c50ecd350472b42765b0297af35a4b0 100644 (file)
@@ -209,7 +209,8 @@ var AuthPrompt = GObject.registerClass({
         }
 
         this._updateEntry(secret);
-        this.setQuestion(question);
+        // HACK: the question comes directly from PAM
+        this.setQuestion(question.replace(/: *$/, '…').trim());
 
         this.updateSensitivity(true);
         this.emit('prompted');